package com.seednia.module.core.xport;

import java.io.File;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.Map;

import com.seednia.foundation.framework.service.IService;
import com.seednia.foundation.framework.service.ServiceException;

/**
 * 
 * @author Young Suk Ahn
 *
 */
public interface IXportService extends IService 
{
	Map<String, IExporter> getExporters();
	Map<String, IImporter> getImporters();
	
	/**
	 * Exports the application data to output stream
	 * @param format TODO
	 * @param params
	 * @return
	 */
	void exportAppData(String format, String comments, OutputStream os, Map<String, Object> params) throws ServiceException;
	
	/**
	 * Exports the application data to a specific file
	 * @param format TODO
	 * @param file
	 * @param params
	 */
	void exportAppData(String format, String comments, File file, Map<String, Object> params) throws ServiceException;

	/**
	 * Imports data from input stream, which is in XML format, 
	 * and inserts them into the respective table using DataOrientedServices
	 * @param format TODO
	 * @param params TODO
	 * @param input
	 */
	void importAppData(String format, InputStream xmlInput, Map<String, Object> params) throws ServiceException;

	/**
	 * Imports data from file, which is in XML format, 
	 * and inserts them into the respective table using DataOrientedServices
	 * @param format TODO
	 * @param params TODO
	 * @param input
	 */
	void importAppData(String format, File file, Map<String, Object> params) throws ServiceException;
	
}
